home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / game / patch / Civvie.lha / Civvie / readme < prev   
Text File  |  1997-02-01  |  6KB  |  141 lines

  1. Civvie 1.0
  2. ----------
  3.  
  4. CivManager provides a better savefiles interface to Civilization.
  5. When it works, you get readable names for your saves such as
  6. Emperor Caesar of the Romans/1 AD or Emperor Max of the French/2000 BC.3
  7.  
  8. As it is a hack, you should be aware of what you are doing, so there
  9. is no install file. You have to understand what is going on to install it.
  10.  
  11. I got the idea from a small program by xxx named civmanager. My program
  12. mostly is an extension of the base idea to a proper civilization save files
  13. manager.
  14.  
  15. Installation:
  16. ------------
  17. Start with civilization installed on your harddisk. Set your machine up
  18. so that the assign civ: points to civilization directory. If you are not
  19. running at least 2.04, you are out of luck.
  20.  
  21. Civmanager has been developped with civilization ECS. I don't know whether
  22. it works if you have civilization AGA. As it just depends on the save files
  23. format, and the save files name, there is a good chance this has not changed.
  24.  
  25. Create a directory named civ:saves to store your save files.
  26. Rename the main civilization program to civilization.exe. Keep whatever
  27. scripts you had around to launch civilization under any name you wish.
  28.  
  29. Choose civmanager flavor: if you already have ixemul, civmanager.ixemul is
  30. smaller, whereas civmanager.sasc doesn't use any external library.
  31.  
  32. copy civmanager to civ:  Name it civilization if you wish, or leave it as
  33. civmanager.
  34.  
  35.  
  36.  
  37. Checking that it works
  38. ----------------------
  39. Start civmanager from a CLI. A file requester should pop up asking you for a 
  40. save file in an empty subdirectory. Select CANCEL for the time being.
  41. Civilization should start up normally. Play as usual. When you want to save
  42. a game, save it to RAM:. At that point, you should hear/see your harddrive 
  43. at work, which is unusual for civilization.
  44.  
  45. Quit civilization. You should experience no unusual problems (that is,
  46. civilization already hangs randomly on my machine).
  47.  
  48. Check the civ:saves directory. Your save files should be there, with readable
  49. names, such as Emperor Caesar of the Romans/3880 BC.
  50.  
  51. Start civmanager again, this time tell it to restaure one of these savefiles.
  52. Once civilization proper starts up, select load, go to the ram disk: you should
  53. find your save file on the ram disk. Check that it restaures properly.
  54.  
  55. In case anything does not work as expected, check messages in the CLI window.
  56. You may get a clear indication of what is going wrong.
  57. If civilization doesn't run, check the subtask.c source against the assigns 
  58. you usually have to apply for civilization.
  59.  
  60. If the save files don't convert properly, check that 
  61. - the map file is 40000 bytes long
  62. - file names come in pair: civil#.sve and civil#.map
  63. - the sve file starts as expected (see civ.c for the header format)
  64.  
  65. Converting old save files
  66. -------------------------
  67. Note that you can still load all saves into civilization and save them to
  68. ram: one by one... this can be rather tedious though.
  69. You had better use your amiga multitasking capabilities.
  70. - start civmanager, don't restaure any save, let civilization launch.
  71. - switch back to workbench. Get another cli running.
  72. - copy your old saves to the ram disk. Namely, for a device hd0: that
  73. holds save files, do a copy hd0:civil?.map ram:, then a 
  74. copy hd0:civil?.sve ram:   VERY IMPORTANT: you have to copy the .sve files
  75. AFTER the .map files, as civmanager savefile watcher is triggered by civil?.sve
  76. modifications. Otherwise, maps and sve can easily get out of sync.
  77.  
  78. I'd advise to check your new save files before deleting the old.
  79.  
  80. Useful tips
  81. -----------
  82. - If you are playing several games at the same time, arrange things to get
  83. distinct directories. Either play different nations, or use different leader
  84. names. Save file names are completely automatic. Popping up a requester would
  85. be more difficult, as civilization tends to catch every keyboard and mouse 
  86. event in a non system friendly way.
  87. - civmanager bases savefiles names on contents. Moving files around doesn't
  88. help. It would be trivial to add some editing abilities to civmanager, though.
  89. - ModePro is a great program. It can promote civilization screens handsomely.
  90. Civilization is designed for a 400 lines display, such as NTSC or Euro36. It
  91. does look much better than PAL.
  92.  
  93.  
  94. Technical details
  95. -----------------
  96. Civmanager is based upon dos.library file notification.
  97.  
  98. What it does is:
  99. - move `compact' save file to ram:civil0.sve / ram:civil0.map
  100. - launch a subtask that starts civilization
  101. - set up file notification requests for civil0-9.sve
  102. - catch up all save files to ram:, convert the file to its compact format
  103. - cleans up everything when the subtask notifies it and dies.
  104.  
  105. It is a good example of FileNotification.
  106. Some reverse engineering was done to read civilization file headers.
  107.  
  108. The file management is trivial: it saves to the first save file that
  109. does not exist, going through Emperor Max of the Romans/3980 BC,
  110. then Emperor Max of the Romans/3980 BC.1, Emperor Max of the Romans/3980 BC.2.
  111. The only tricky part is that civilization uses the same save file name several
  112. times (Deleting the old file, then creating the new). As we are watching
  113. asynchronously, we may get several File notifications requests that concern
  114. the same save, so we check the file' last modification time to ensure we don't
  115. copy the same save twice.
  116.  
  117. This program also shows how to start a subprocess in a simple reliable way,
  118. and clean up correctly at death: public message port, plus death message
  119. in Forbid()-protected section (so that the other process doesn't quit BEFORE
  120. we actually are dead).
  121.  
  122. Generally, it shows how reasonable error-handling can be done: never do 
  123. anything that may crash the machine, and handle all errors reasonably... 
  124. some times reporting the error is enough.
  125.  
  126. Other things
  127. ------------
  128. This hack was written in 2 hours to check for faisability, then I spent another
  129. three hours to get the source to its present state.
  130.  
  131. Compiling under SAS/C as well as gcc is pretty easy when you start with clear
  132. ideas.
  133.  
  134. This is freely distributable. You may change and redistribute it. Please do
  135. give me proper credit, state any modifications you make clearly, both in the
  136. source and executable. Don't redistribute as a partial archive, without either
  137. source or documentation.
  138.  
  139.     Marc Espie (Marc.Espie@ens.fr)
  140.     january 1997
  141.